{% macro docs_toc(page) %}
  {% if page.extra.toc %}
  <nav class="docs-toc d-none d-xl-block col-xl-3" aria-label="Secondary navigation">
  	<div class="page-links">
  			<h3>On this page</h3>
  			<nav id="TableOfContents">
  					<ul>
  							{% for h1 in page.toc %}
  							<li><a href="{{ h1.permalink | safe}}">{{ h1.title }}</a></li>
  							{% if h1.children %}
  									<ul>
  											{% for h2 in h1.children %}
  											<li><a href="{{ h2.permalink | safe }}">{{ h2.title }}</a></li>
  											{% endfor %}
  									</ul>
  							{% endif %}
  							{% endfor %}
  					</ul>
  			</nav>
  	</div>
  </nav>
  {% endif %}
{% endmacro %}
